package Options::UserSync::API::ShopperID;

use strict;
use warnings;

sub getNewShopperID {
    my ($Shop) = @_;
    my $ShopperIDno = $Shop->get('NextShopperID');
    if ( $ShopperIDno < 50000 || !defined($ShopperIDno) ) {
        $ShopperIDno = 50000;
    }
    my $ToReturnShopperIDno = $ShopperIDno;
    $ShopperIDno++;
    $Shop->set( { 'NextShopperID' => $ShopperIDno } );
    return $ToReturnShopperIDno;
}
1;
